package one;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.server.SeleniumServer;

@SuppressWarnings("deprecation")
public class RS_2 extends SeleneseTestCase {
	public SeleniumServer rs;
	@Before
	public void setUp() throws Exception {
		rs=new SeleniumServer();
		rs.start();
		selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.rightstart.com/");
		
		selenium.start();
	}



	@Test
	public void testUntitled() throws Exception {
		selenium.open("/");
		selenium.windowMaximize();
		selenium.type("id=search","strollers");
		selenium.click("class=btn_search");
		selenium.waitForPageToLoad("60000");
		//selenium.click("id=product_list-add_to_cart-button-8506");
		selenium.click("id=product_list-title-alink-8506");
		selenium.waitForPageToLoad("60000");
		selenium.type("id=qty","2");
		String price = selenium.getText("product-price-10549");
	
		//System.out.Println("value[381.65]");
		System.out.println("price="+price);
				
		
		
		
		
	}

	@After
	public void tearDown() throws Exception {
		selenium.stop();
		rs.stop();
	}
}

